package top.bigdata.service;

import jakarta.annotation.PostConstruct;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import top.bigdata.mapper.TableMapper;

@Service
@RequiredArgsConstructor
public class Initializer {
    private final TableMapper tableMapper;

    /**
     * 启动时创建hive表
     */
    @PostConstruct
    public void createTables() {
        tableMapper.createVideoTable();
        tableMapper.createResultTable();
    }
}
